﻿using System;
using System.Windows;
using Microsoft.Phone.Controls;

namespace JustinAngel.MindwaveSensor.WP8.TestApp
{
    public partial class Menu : PhoneApplicationPage
    {
        public Menu()
        {
            InitializeComponent();
            this.Loaded += Menu_Loaded;
        }

        void Menu_Loaded(object sender, RoutedEventArgs e)
        {
            btnTextData.IsEnabled = Mindwave.Current.IsConnected;
            btnLineChart.IsEnabled = Mindwave.Current.IsConnected;
            btnGagues.IsEnabled = Mindwave.Current.IsConnected;
        }

        private void btnConnect_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/ManualConnection.xaml", UriKind.Relative));
        }

        private void btnTextData_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/TextMindwaveData.xaml", UriKind.Relative));
        }

        private void btnLineChart_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/LineChartMindwaveData.xaml", UriKind.Relative));
        }

        private void btnGagues_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/TelerikGagues.xaml", UriKind.Relative));
        }

        private void btnStandalone_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Standalone.xaml", UriKind.Relative));
        }

        private void btnControls_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/CustomControls.xaml", UriKind.Relative));
        }

        private void btnSetup_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Setup.xaml", UriKind.Relative));
        }
    }
}